package boogui.member;

import java.util.Scanner;

/*
 * 아이디/비밀번호 찾기
*/

public class MemberFindService {

	// 아이디 찾기
	public void searchId() {
		MemberFindDAO fdao = new MemberFindDAO();
		
		Scanner sc = new Scanner(System.in);
		
		System.out.println("이름입력");
		String name = sc.next();
		System.out.println("email입력");
		String email = sc.next();
		
		String result = fdao.findId(name, email);
		
		if (result != "") {
			System.out.println(result);
		} else {
			System.out.println("없음");
		}
	}
	
	// 비밀번호 찾기
	public void searchPwd() {
		MemberFindDAO fdao = new MemberFindDAO();
		
		Scanner sc = new Scanner(System.in);
		
		System.out.println("id입력");
		String id = sc.next();
		System.out.println("이름입력");
		String name = sc.next();
		System.out.println("email입력");
		String email = sc.next();
		
		String result = fdao.findPwd(id, name, email);
		
		if (result != "") {
			System.out.println(result);
		} else {
			System.out.println("없음");
		}
	}
}
